package com.zhfi.dataapply.mapper.common;

import com.zhfi.dataapply.entity.job.JobSetting;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface JobSettingMapper {

    @Select("select * from m_job_setter")
    List<JobSetting> getJobSetterList();

    @Update("update m_job_setter set status = 'FINISHED' where job_name = #{jobClassName} ")
    int finished(String jobName);

    @Update("update m_job_setter set status = 'RUNNING' where job_name = #{jobClassName} ")
    int running(String jobName);

    @Update("update m_job_setter set status = 'FAILED' where job_name = #{jobClassName} ")
    int failed(String jobName);

}
